package com.prs.crm.dao.official.impl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.dao.official.DeptMailDao;
import com.prs.crm.domain.official.DeptMail;

public class DeptMailDaoImpl extends BaseDaoImpl<DeptMail> implements DeptMailDao{

	@Override
	public DeptMail getDeptMailById(final Integer id) {
		Criteria criteria=this.getSession().createCriteria(DeptMail.class);
		criteria.add(Restrictions.eq("id", id));
		List result=criteria.list();
		return (DeptMail) result.get(0);
	}

}
